package ru.tapublog.lib.samsungwallet.impl.dao;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;


@XmlAccessorType(XmlAccessType.FIELD)
public class PartnerDAO {

	private String id;

	private Data partner = new Data();

	@XmlAccessorType(XmlAccessType.FIELD)
	public static class Data {
		private String banner;
		private String link;
		private DateType validUntil;
		public String getBanner() {
			return banner;
		}
		public void setBanner(String banner) {
			this.banner = banner;
		}
		public String getLink() {
			return link;
		}
		public void setLink(String link) {
			this.link = link;
		}
		public DateType getValidUntil() {
			return validUntil;
		}
		public void setValidUntil(DateType validUntil) {
			this.validUntil = validUntil;
		}
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result
					+ ((banner == null) ? 0 : banner.hashCode());
			result = prime * result + ((link == null) ? 0 : link.hashCode());
			result = prime * result
					+ ((validUntil == null) ? 0 : validUntil.hashCode());
			return result;
		}
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Data other = (Data) obj;
			if (banner == null) {
				if (other.banner != null)
					return false;
			} else if (!banner.equals(other.banner))
				return false;
			if (link == null) {
				if (other.link != null)
					return false;
			} else if (!link.equals(other.link))
				return false;
			if (validUntil == null) {
				if (other.validUntil != null)
					return false;
			} else if (!validUntil.equals(other.validUntil))
				return false;
			return true;
		}
		@Override
		public String toString() {
			return "Data [banner=" + banner + ", link=" + link
					+ ", validUntil=" + validUntil + "]";
		}
		
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Data getPartner() {
		return partner;
	}

	public void setPartner(Data partner) {
		this.partner = partner;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PartnerDAO other = (PartnerDAO) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "PartnerDAO [id=" + id + ", partner=" + partner + "]";
	}

	

}
